﻿using System;
using System.Collections.Generic;
using System.Text;
using Mang24k99.Model.SPECT;

namespace Mang24k99.Business.SPECT
{
     public class BKtSpectSubtype
     {
         //创建一条记录
         public static void Create(MKtSpectSubtype subtype)
         {
             MKtSpectSubtype.Create(subtype);
         }
         //删除一条记录
         public  static bool Delete(MKtSpectSubtype subtype)
         {
             try
             {
                 MKtSpectSubtype.Delete(subtype);
                 return true;
             }
             catch (System.Exception e)
             {
                 return false;
             }
             
         }
         /// <summary>
         /// 修改一条记录
         /// </summary>
         /// <param name="subtype"></param>
         public static void Update(MKtSpectSubtype subtype)
         {
             MKtSpectSubtype.Update(subtype);
         }
         /// <summary>
         /// 通过where语句返回符合条件记录
         /// </summary>
         /// <param name="where"></param>
         /// <returns></returns>
         public static IList<MKtSpectSubtype> SelectByWhere(string where)
         {
             return (IList<MKtSpectSubtype>)MKtSpectSubtype.SelectByWhere(where);
         }
         /// <summary>
         /// 通过属性列返回符合条件的记录
         /// </summary>
         /// <param name="property"></param>
         /// <param name="value"></param>
         /// <returns></returns>
         public static IList<MKtSpectSubtype> SelectALLByProperty(string property,object value)
         {
             return (IList<MKtSpectSubtype>) MKtSpectSubtype.SelectALLByProperty(property,value);
         }
         /// <summary>
         /// 选择最大的专题类别编号
         /// </summary>
         /// <returns></returns>
         public static int SelectMaxNO()
         {
             return (int)MKtSpectSubtype.SelectMaxNO();
         }

         /// <summary>
         /// 返回所有可用的记录条数
         /// </summary>
         /// <returns></returns>
         public static int GetCount()
         {
             string where = "subtype.IsValidate = 1";
             return (int)MKtSpectSubtype.GetCount(where);
         }
         /// <summary>
         /// 返回符合条件的记录集合
         /// </summary>
         /// <param name="start"></param>
         /// <param name="max"></param>
         /// <returns></returns>
         public static IList<MKtSpectSubtype> FindALLSliced(int start, int max)
         {
             string where = "subtype.IsValidate = 1";
             return (IList<MKtSpectSubtype>)MKtSpectSubtype.FindALLSliced(start, max, where);
         }
     }
}
